home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
xmbase-grok-1.2
/
Makefile.alt
< prev
next >
Wrap
Makefile
|
1995-06-25
|
8KB
|
258 lines
#
# grok Makefile. Use this by running "make -f Makefile.alt" if you don't have
# xmkmf and/or imake. Otherwise, run "xmkmf" and "make".
#
GBIN = /usr/local/bin
GLIB = /usr/local/lib
DEBUG = -g
#DEBUG = -O2 -s
SGI_C = -DSYSV -DSVR4 -wlint -woff 813,827,852,819,826,822
SGI6_C = -DSYSV -DSVR4 -wlint -woff 813,827,852,819,826,822 -32
HP_C = -Aa -I/usr/include/Motif1.2 -I/usr/include/X11R5 -I/usr/include\
-D_INCLUDE_HPUX_SOURCE -D_INCLUDE_POSIX_SOURCE -D_INCLUDE_XOPEN_SOURCE
IBM_C = -I/usr/include/X11 -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_ANSI_C_SOURCE
OSF_C =
SUN_C =
SUNG_C = -ansi -I/usr/5include -I/usr/include/X11
SOL_C = -I/usr/local/X11R5/include -I/usr/local/X11R5/include/X11
ULTRIX_C=
CDC_C =
MIPS_C = -systype sysv -Wf,-XNd4000 -DPID_T="int" -I/usr
DG_C =
SNI_C = -DSYSV
SCO_C =
NCR_C =
USL_C = -I/usr/X/include
BSDI_C = -I/usr/X11/include
BSDIG_C = -I/usr/X11/include -ansi
#
# loader flags. Requires X11, Xt, and Motif libraries. PW is for regcmp/regex.
#
SGI_L = -lXm_s -lXt_s -lX11_s -lPW -lsun -lm
SGI6_L = -lXm -lXt -lX11 -lPW -lm
HP_L = -L/usr/lib/X11R5 -L/usr/lib/Motif1.2 -lXm -lXt -lX11 -lc -lm
IBM_L = -lXm -lXt -lX11 -lPW -lm
OSF_L = -lXm -lXt -lX11 -lm
SUN_L = -lXm -lXt -lX11 -lm
SUNG_L = -L/usr/5lib -lXm -lXt -lX11 -lm
SOL_L = -L/usr/local/X11R5/lib -lXm -lXt -lX11 -lelf -lgen -lm
ULTRIX_L= -lXm -lXt -lX11 -lm
CDC_L = -lXm -lXt -lX11 -lgen -lnsl -lsocket -lm
MIPS_L = -lXm -lXt -lX11 -lbsd -lsun -lc -lPW -lm
DG_L = -lXm -lXt -lX11 -lPW -lm
SNI_L = -lXm -lXt -lX11 -lsocket -lnsl -lXmu -lm
SCO_L = -lXm -lXt -lXmu -lX11 -lPW -lm -lsocket
NCR_L = -lXm -lXt -lX11 -lXext -lnsl -lgen -lm
USL_L = -B static -lXm -B dynamic -lXaw -lXext -lXmu -lXt -lX11 -lm -lnsl -lgen -lm
USL_Lm = -lXm -lXaw -lXext -lXmu -lXt -lX11 -lm -lnsl -lgen -lm
BSDI_L = -lXm -lXt -lX11 -lm
BSDIG_L= -L/usr/X11/lib -lXm -lXt -lX11 -lm
#---------------------------------------------------------------
# available options from the list at the top of this Makefile, add an echo
# here, and add a target in the next section. Please mail patches to me.
help:
@echo "Usage:"
@echo " make -f Makefile.alt SYS"
@echo ""
@echo "SYS is one of the following:"
@echo " sgi All 4.x and 5.x SGI systems"
@echo " sgi6 All 6.x SGI systems"
@echo " hp HP/UX 9.x with X11R5 and Motif 1.2"
@echo " ibm IBM RS6000 running AIX"
@echo " osf DEC running OSF/1"
@echo " sun Sun with Motif (won't work with OpenLook)"
@echo " sung Sun 4.1.3/Solaris 2.2 with Motif, using gcc"
@echo " sol Solaris 2.2 with Motif, using cc"
@echo " ultrix Ultrix 4.3 with Motif 1.1.3"
@echo " cdc CDC/Mips running EP/IX 2.1.1"
@echo " mips Mips Magnum RISCos 4.52 with RISCwindows 4.0"
@echo " dg Data General DG/UX, with gcc"
@echo " sni SNI SINIX 5.41"
@echo " sco SCO Open Desktop/Open Server 3.0"
@echo " ncr NCR 3000 systems"
@echo " usl USL SVR4.2 V1 with mdev package"
@echo " uslm ...same with Motif run-time libraries"
@echo " bsdi BSDI/386"
@echo " bsdig BSDI/386 with gcc"
@echo ""
@echo " make install install compiled programs in"
@echo " $(GBIN) and $(GLIB)."
@echo " make clean remove everything in this dir except sources"
@echo ""
@echo "If you have problems, first read this Makefile. You may also"
@echo "want to change the installation directory if you are not root."
@echo "The installation directory is set at the top of this Makefile."
@echo ""
@echo "NOTE: GROK IS CURRENTLY SUPPORTED ON SGI, HP, AND IBM SYSTEMS."
@echo "All the other ports are best guesses. Read and edit config.h."
#---------------------------------------------------------------
sgi:
env CF="$(SGI_C)" LF="$(SGI_L)" YO="" MYCC=cc make -f Makefile.alt all
sgi6:
env CF="$(SGI6_C)" LF="$(SGI6_L)" YO="" MYCC=cc make -f Makefile.alt all
hp:
env CF="$(HP_C)" LF="$(HP_L)" YO="-Nm15000" MYCC=cc make -f Makefile.alt all
ibm:
env CF="$(IBM_C)" LF="$(IBM_L)" YO="" MYCC=cc make -f Makefile.alt all
osf:
env CF="$(OSF_C)" LF="$(OSF_L)" YO="" MYCC=cc make -f Makefile.alt all
sun:
env CF="$(SUN_C)" LF="$(SUN_L)" YO="" MYCC=acc make -f Makefile.alt all
sung:
env CF="$(SUNG_C)" LF="$(SUNG_L)" YO="" MYCC=gcc make -f Makefile.alt all
sol:
env CF="$(SOL_C)" LF="$(SOL_L)" YO="" MYCC=cc make -f Makefile.alt all
ultrix:
env CF="$(ULTRIX_C)" LF="$(ULTRIX_L)" YO="" MYCC=cc make -f Makefile.alt all
cdc:
env CF="$(CDC_C)" LF="$(CDC_L)" YO="" MYCC=cc make -f Makefile.alt all
mips:
env CF="$(MIPS_C)" LF="$(MIPS_L)" YO="" MYCC=cc make -f Makefile.alt all
dg:
env CF="$(DG_C)" LF="$(DG_L)" YO="" MYCC=gcc make -f Makefile.alt all
sni:
env CF="$(SNI_C)" LF="$(SNI_L)" YO="" MYCC=cc make -f Makefile.alt all
sco:
env CF="$(SCO_C)" LF="$(SCO_L)" YO="" MYCC=cc make -f Makefile.alt all
ncr:
env CF="$(NCR_C)" LF="$(NCR_L)" YO="" MYCC=cc make -f Makefile.alt all
usl:
env CF="$(USL_C)" LF="$(USL_L)" YO="" MYCC=cc make -f Makefile.alt all
uslm:
env CF="$(USL_C)" LF="$(USL_Lm)" YO="" MYCC=cc make -f Makefile.alt all
bsdi:
env CF="$(BSDI_C)" LF="$(BSDI_L)" YO="" MYCC=acc make -f Makefile.alt all
bsdig:
env CF="$(BSDIG_C)" LF="$(BSDIG_L)" YO="" MYCC=gcc make -f Makefile.alt all
#------------------------------ don't change anything below ------------------
INC = config.h form.h grok.h proto.h patchlevel.h resource.h\
bm_icon.h bm_left.h bm_right.h
SRC = main.c mainwin.c formwin.c formop.c canvdraw.c cardwin.c \
formfile.c dbase.c dbfile.c popup.c util.c help.c eval.c \
evalfunc.c query.c querywin.c sumwin.c parser.y prefwin.c\
printwin.c print.c convert.c chart.c chartdrw.c editwin.c\
sectwin.c
OBJ = main.o mainwin.o formwin.o formop.o canvdraw.o cardwin.o \
formfile.o dbase.o dbfile.o popup.o util.o help.o eval.o \
evalfunc.o query.o querywin.o sumwin.o y.tab.o prefwin.o \
printwin.o print.o convert.o chart.o chartdrw.o editwin.o\
sectwin.o
DOC = doc/formedit.tex doc/grammar.tex doc/macro.tex doc/main.tex
DEMO = grokdir/countries.db grokdir/countries.gf \
grokdir/phone.db grokdir/phone.gf \
grokdir/phonelog.db grokdir/phonelog.gf \
grokdir/todo.db grokdir/todo.gf \
grokdir/diary.db grokdir/diary.gf \
grokdir/passwd.gf \
grokdir/procdemo grokdir/procdemo.gf \
grokdir/weather.db grokdir/weather.gf \
grokdir/checkbook.db grokdir/checkbook.gf\
grokdir/www_pages.db grokdir/www_pages.gf
all: grok
grok: $(OBJ)
$(MYCC) $(DEBUG) $(CF) $(INCDIR) -o grok $(OBJ) $(LF)
.c.o:
$(MYCC) $(DEBUG) $(CF) $(INCDIR) -c $<
y.tab.c: parser.y
yacc -d $(YO) parser.y
mainwin.o: mainwin.c
$(MYCC) $(DEBUG) $(CF) $(INCDIR) -c -DLIB=\"$(GLIB)\" $<
util.o: util.c
$(MYCC) $(DEBUG) $(CF) $(INCDIR) -c -DPATH=\"$(GBIN):$(GLIB)\" $<
$(OBJ): grok.h proto.h form.h
popup.o: patchlevel.h
main.o: resource.h
util.o: bm_icon.h
evalfunc.o: y.tab.h
y.tab.h eval.o: y.tab.c
#---------------------------------------------------------------
install:
cp grok $(GBIN)
cp grok.hlp $(GLIB)
-strip $(GBIN)/grok
-chmod 755 $(GBIN)/grok
-chmod 644 $(GLIB)/grok.hlp
-test -d ~/.grok || (mkdir $$HOME/.grok; cp grokdir/?* $$HOME/.grok)
clean:
-rm -f *.o y.tab.h y.tab.c lex.yy.c core grok tags y.output *.shar*
-rm -f doc/?*dvi doc/?*tmp doc/?*log doc/?*aux doc/?*cont
#---------------------------------------------------------------
Manual.ps: doc/main.dvi
dvips -f doc/main.dvi >Manual.ps
-rm -f doc/jobname.cont doc/main.cont doc/main.log
doc/main.dvi: doc/formedit.tex doc/grammar.tex doc/macro.tex doc/main.tex
cd doc; tex main.tex; tex main.tex
-rm -f doc/jobname.cont doc/main.cont doc/main.log
#---------------------------------------------------------------
LIST = README HISTORY grok.hlp Imakefile Makefile.alt $(SRC) $(INC)\
Manual.ps $(DOC) $(DEMO) grok.1 grok.1cat
shar: Manual.ps
-rm -f grok.shar*
shar -n grok -a -M -o grok.shar -L 50 $(LIST)
uushar: Manual.ps
-rm -f grok.shar*
shar -n grok -a -M -o grok.shar -L 63 $(LIST)
gzip -9 grok.shar*
apply "uuencode %1 <%1 >%1.uu" grok.shar*
-rm -f grok.shar*.gz
tar:
-rm grok.tar*
tar cvf grok.tar Makefile $(SRC) $(INC)
compress grok.tar
shar -n grok -a -M -o grok.tar.Z.shar -L 60 grok.tar.Z
rm grok.tar.Z